package ru.spb.nicetu.altx.mnemo.validator;



public class ValidatorFactory {
  private static ValidatorFactory instance = new ValidatorFactory();
  
  private ValidatorFactory() {
  }
  
  public static ValidatorFactory getInstance() {
      return instance;
  }
  
  public ICorrectValidator createValidator(Class<?> validatorClass) {
    try {
      return (ICorrectValidator) validatorClass.getConstructor()
                        .newInstance();
    } catch (Exception e) {
        e.printStackTrace();
    }
    return null;
  }
}
